<template>
  <div>
    <el-container>
      <el-main>
          <articleItem v-for="article in articles" v-bind="article" :key="article.id">

          </articleItem>
      </el-main>
    </el-container>
  </div>
</template>
<script>

import articleItem from "@/components/articleItem";
import {getRecommendArticle} from "@/api/article";

export default {
  name: "articleDiscover",
  data(){
    return{
      articles:[]
    }
  },
  methods:{
    getArticles() {
      getRecommendArticle().then((res) => {
        if(res.data.success){
          this.articles=res.data.data
        }else {
          this.$message.error(res.data.msg)
        }
      }).catch((err)=>{
        this.$message.error("系统错误")
      }).finally(()=>{
      })
    }
  },
  created() {
    this.getArticles()
  },
  components:{
    articleItem
  }
}
</script>

<style scoped>

.artile-description {
  font-size: 15px;
  font-weight:520;
  line-height: 25px;
  margin-bottom: 30px;
  margin-top: 5px;
}
.article-header {
  padding-bottom: 10px;
}
.article-footer {
  /*margin-bottom: 10px;*/
}
.pull-right {
  float: right;
}

.article-title {
  font-weight: bold;
  font-size: 20px;
}
.article-count {
  color: #8690a6;
  padding-left: 14px;
  font-size: 15px;
}
/*底部创建时间*/
.Cbottom {
  padding-top: 16px;
}
/*文章卡片大小调整*/
.box-card {
  /*height: 200px;高度自适应改变*/
  width: 820px;
  border-radius: 5px;

}
/*文章卡片整体调整*/
.el-card{
  margin-bottom:20px;
  margin-left:90px;
}

/*标签的字体色彩*/
.el-tag.el-tag--success {
  background-color: #e5efff;
  border-color: #ffffff;
  color: #0066ff;
}
.el-button{
  background-color: #e5efff;
  border-color: #ffffff;
  color: #0066ff;
}
</style>
